package com.chenhao.springcloud.chenhaodesignservice.pattern.creational.prototype;

/**
 * Description:原型模式
 *
 * @author chenhao
 * @date 2020/12/21 16:55
 */
public class Mail {
    private  String name;
    private String emilAddress;
    private String content;

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmilAddress() {
        return emilAddress;
    }

    public void setEmilAddress(String emilAddress) {
        this.emilAddress = emilAddress;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Mail(){
        System.out.println("Mail class Constructor");
    }

    @Override
    public String toString() {
        return "Mail{" +
                "name='" + name + '\'' +
                ", emilAddress='" + emilAddress + '\'' +
                ", content='" + content + '\'' +
                '}';
    }
}
